<!--
/**************************************************
* @(#)bargainview.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006-04-20, owen
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8" %>
<html>
	<head>
		<title>合同内容</title>
		<%@ include file="../common.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=root%>/css/caigouxitong.css" rel="stylesheet" type="text/css">
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/hi-check.js"></SCRIPT>
<SCRIPT language="JavaScript" src="js/calendar.js"></SCRIPT>
<%
GSBargainBean tGSBargainBean=(GSBargainBean)request.getAttribute("BargainBean");
ArrayList tBargainChargeList=new ArrayList();
tBargainChargeList=(ArrayList)request.getAttribute("BargainChargeList");
String tStatus=(String)request.getAttribute("status");
%>
<script language="javascript">
         function back(){
			 
			  orderqueryform.action="<%= response.encodeURL(request.getContextPath() + "/A170101.do") %>";   
	          orderqueryform.submit();
			
			}
			
          function down(){
			var url = "<%=response.encodeURL(root+"/A170110.do")%>?filename=<%=tGSBargainBean.getGs_bgn_serial() %>&down=<%=tGSBargainBean.getGs_bgn_id()%>";
		    window.open(url,null," edge: sunken ,center: Yes, help: No, resizable: Yes, status: No,width=280px,height=220px, scrollbars=yes");
		     }   
		  
		  function wclose(){
		     window.close();
		  }  
</script>

	</head>
	<body BGCOLOR="#f2f2f2" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
		<!--onload="setEnable();">-->
		<form name="orderqueryform" method="post">
			<p><br>
			</p>
			<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
				<tr>
					<td height="20">
						<table width="100%" border="0" cellspacing="0" cellpadding="1">
							<tr height="20">
								<td height="30" width="758" class="mtxt_black">合同信息
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="bg_line" height="2"></td>
				</tr>
			</table>
			<br>
			<table class="bg_table" id="Table1" cellspacing="1" cellpadding="0" style="PADDING-RIGHT:5px; PADDING-LEFT:5px"
				width="98%" align="center" border="0">
				<TR height="20">
					<TD class="bg_column" align="center" colspan="4"><b>主体信息</b></TD>
				</TR>
				<TR height="20">
					<TD class="bg_column" align="center" width="15%">序号</TD>
					<TD class="bg_row_odd" width="35%"><%=tGSBargainBean.getGs_bgn_id() %>
					</TD>
					<TD class="bg_column" align="center" width="15%">合同类型</TD>
					<TD align="left" class="bg_row_odd" width="35%">
						<%=GSBaseManager.getBargain(tGSBargainBean.getGs_bgn_type()) %> 
						<%if(tGSBargainBean.getGs_bgn_type().equals("2")){ 
						  out.println("主合同编号:"+tGSBargainBean.getGs_bgn_mainserial());
						  }
						%>
						
					</TD>
				</TR>
				<TR height="20">
					<TD class="bg_column" align="center">客户类型</TD>
					<TD align="left" class="bg_row_odd">
						<%=GSBaseManager.getUserType(tGSBargainBean.getGs_bgn_usertype()) %>
					</TD>
					<TD class="bg_column" align="center" width="15%">客户名称</TD>
					<TD class="bg_row_odd" align="left" width="35%">
					<%//if(tGSBargainBean.getGs_bgn_usertype().equals("1")){ %>
						<%//=GSBaseManager.getProviderName(tGSBargainBean.getGs_bgn_userid()) %>
					<%//}else{ %>	
						<%//=GSBaseManager.getOrgNameByOrgId(tGSBargainBean.getGs_bgn_userid()) %>
					<%//} %>
					<%=tGSBargainBean.getGs_bgn_userid() %>
					</TD>
				</TR>
				<TR height="20">
					<TD class="bg_column" align="center">合同（协议）内容</TD>
					<TD left="right" class="bg_row_odd" colspan="3">
						<%=tGSBargainBean.getGs_bgn_content() %>
					</TD>
				</TR>
				<tr height="20">
					<TD class="bg_column" align="center">页数</TD>
					<TD align="left" class="bg_row_odd">
						<%=tGSBargainBean.getGs_bgn_number() %>
					</TD>
					<TD class="bg_column" align="center">附件数</TD>
					<TD align="left" class="bg_row_odd">
						<%=tGSBargainBean.getGs_bgn_filenumber() %>
					</TD>
				</tr>
				<tr height="20">
					<TD class="bg_column" align="center">相关文件</TD>
					<TD class="bg_row_odd" colspan="3">
						<a href="#" onclick="return down()">
						 <%=tGSBargainBean.getGs_bgn_filename() %>
						</a>
					</TD>
				</tr>
				<TR height="20">
					<TD class="bg_column" align="center">部门</TD>
					<td class="bg_row_odd"><%=tGSBargainBean.getGs_bgn_department()%></td>
					<TD class="bg_column" align="center">签约人</TD>
					<td class="bg_row_odd"><%=tGSBargainBean.getGs_bgn_signuser() %></td>
				</TR>
				<tr height="20">
					<TD class="bg_column" align="center">签约日期</TD>
					<TD align="left" class="bg_row_odd">
						<%=tGSBargainBean.getGs_bgn_signdate() %>
					</TD>
					<TD class="bg_column" align="center">终止日期</TD>
					<TD align="left" class="bg_row_odd">
						<%=tGSBargainBean.getGs_bgn_enddate() %>
					</TD>
				</tr>
				<TR height="20">
					<TD class="bg_column" align="center">期限</TD>
					<td class="bg_row_odd">
					<%=tGSBargainBean.getGs_bgn_term() %>
					</td>
					<TD class="bg_column" align="center">卷号</TD>
					<td class="bg_row_odd">
					<%=tGSBargainBean.getGs_bgn_vol() %>
					</td>
				</TR>
				<TR height="20">
					<TD class="bg_column" align="center">编号</TD>
					<td class="bg_row_odd">
					<%=tGSBargainBean.getGs_bgn_serial() %>
					</td>
					<TD class="bg_column" align="center">归卷日期</TD>
					<td class="bg_row_odd">
					<%=tGSBargainBean.getGs_bgn_returneddate() %>
					</td>
				</TR>
				<TR height="20">
					<TD class="bg_column" align="center">收/付款周期</TD>
					<TD left="right" class="bg_row_odd" colspan="3">
						<%=tGSBargainBean.getGs_bgn_week() %>天
					</TD>
				</TR>
				<TR height="20">
					<TD class="bg_column" align="center">备注</TD>
					<TD left="right" class="bg_row_odd" colspan="3">
						<%=tGSBargainBean.getGs_bgn_remark() %>
					</TD>
				</TR>
				<%if(tStatus!=null&&tStatus.equals("1")){%>
				<TR height="20">
					<TD class="bg_column" align="center">修改记录</TD>
					<TD left="right" class="bg_row_odd" colspan="3">
						<a href="<%= response.encodeURL(request.getContextPath() + "/A170303.do") %>?BgmSerial=<%=tGSBargainBean.getGs_bgn_serial()%>&ID=<%=tGSBargainBean.getGs_bgn_id() %>" target="_blank">查看</a>
					</TD>
				</TR>
				<%} %>
			</table>
			<br>
			<table class="bg_table" id="Table1" cellspacing="1" cellpadding="0" style="PADDING-RIGHT:5px; PADDING-LEFT:5px"
				width="98%" align="center" border="0">
				<TR height="20">
					<TD class="bg_column" align="center" colspan="2"><b>费用信息</b></TD>
				</TR>
				
				<tr>
					<TD class="bg_column" align="center"><b>类型</b></TD>
					<TD class="bg_column" align="center"><b>内容</b></TD>
				</tr>
				
				<%
				  if(tBargainChargeList != null && tBargainChargeList.size() > 0 ){
					for(int i=0; i<tBargainChargeList.size(); i++){
					    GSBargainChargeBean tGSBargainChargeBean = (GSBargainChargeBean)tBargainChargeList.get(i);
					     if(!tGSBargainChargeBean.getGs_bgc_type().equals("")){
						%>
				
				<tr>
					<TD class="bg_row_odd" align="center"><%=tGSBargainChargeBean.getGs_bgc_type() %></TD>
					<TD class="bg_row_odd" align="center"><%=tGSBargainChargeBean.getGs_bgc_content() %></TD>
				</tr>
				<%
				      } 
				    }
				  }
				%>
			</table>
		</form>
		<p align="center">
		<%if(tStatus!=null&&tStatus.equals("1")){ %>
		    <INPUT type="button" value="关闭" class="kuang" onclick="return wclose()">
		<%}else{ %>
			<INPUT type="button" value="返回" class="kuang" onclick="return back()">
		<%} %>
		</p>
	</body>
</html>
